from django.db import models


# Create your models here.

# 管理员表
class User(models.Model):
    username = models.CharField(max_length=32, unique=True, primary_key=True)
    password = models.CharField(max_length=32)
    tel = models.CharField(max_length=11)
    email = models.EmailField(max_length=32)
    address = models.CharField(max_length=50)


# 关键词表
class Keyword(models.Model):
    id = models.AutoField(primary_key=True)
    word = models.CharField(max_length=50)
    update_time = models.DateTimeField(auto_now=True)


# 岗位信息表
class Position(models.Model):
    id = models.AutoField(primary_key=True)
    location = models.CharField(max_length=32)  # 工作地点
    education = models.CharField(max_length=32)  # 学历
    salary = models.CharField(max_length=32)  # 薪资
    experience = models.CharField(max_length=32, default='', null=True)  # 工作经验
    requirements = models.CharField(max_length=50, default='', null=True)  # 工作要求
    benifits = models.CharField(max_length=100, default='', null=True)  # 公司福利
    company = models.CharField(max_length=32)  # 所在公司
    profession = models.CharField(max_length=32, default='', null=True)  # 所处行业
    keyword = models.CharField(max_length=32)  # 关键词表外键
